﻿Public Class clsTimKiem
    
    Public Shared Function TimKiemS(ByVal TenSach As String, ByVal TenNXB As String, ByVal NamXB As String, ByVal TenTL As String, ByVal TenTG As String) As DataTable
        Return db.QueryTable("select IDSach,TenSach,TenTG,TrangThai,TenNXB,TenTL,NamXB from sach_tacgia st		inner join Sach s on s.MaSach = st.MaSach	inner join Sub_sach ss  on st.MaSach = ss.MaSach		inner join NhaXuatBan n on n.MaNXB=s.MaNXB		inner join TacGia tg on st.MaTG=tg.MaTG		inner join TheLoai tl on tl.matl = s.MaTL	 where TenSach like N'%" & TenSach & "%' and TenNXB like N'%" & TenNXB & "%' and TenTL like N'%" & TenTL & "%' and TenTG like N'%" & TenTG & "%' and NamXB like '%" & NamXB & "%'")
    End Function
    'Public Shared Function DSTimKiem() As DataTable
    '    Return db.QueryTable("select IDSach,TenSach,TenTG,TrangThai,TenNXB,TenTL,NamXB from sach_tacgia st		inner join Sach s on s.MaSach = st.MaSach	inner join Sub_sach ss  on st.MaSach = ss.MaSach		inner join NhaXuatBan n on n.MaNXB=s.MaNXB		inner join TacGia tg on st.MaTG=tg.MaTG		inner join TheLoai tl on tl.matl = s.MaTL")

    'End Function

End Class
